package com.views
{
	import com.Controller;
	import com.Data;
	import com.SuperBase;
	import com.SuperSubBase;
	import com.View;
	import com.assist.data.IData;
	
	public class Base extends SuperSubBase
	{
		protected var _instanceName:String;
		protected var _view:View;
		protected var _ctrl:Controller;
		protected var _data:IData;
		
		public function Base()
		{
			super();
		}
		
		public function get inStage() : Boolean
		{
			return true;
		}
		
		public function get inStageWithTip():Boolean
		{
			return false;
		}
		
		public function get ignoreKeyboardEvent():Boolean
		{
			return false;
		}
		
		override public function settle(instanceName:String, view:View, controller:Controller, data:Data, superBase:SuperBase) : void
		{
			if (_view == null)
			{
				_instanceName = instanceName;
				_view = view;
				if (_view != superBase)
				{
					throw new Error(inheritError());
				}
				_ctrl = controller;
				_data = data as IData;
				if (_ctrl.hasOwnProperty(instanceName) && hasOwnProperty("ownCtrl"))
				{
					this["ownCtrl"] = _ctrl[instanceName];
				}
			}
//			_structure = _view.structure;
//			_popup = _view.structure.popup;
		}
	}
}